/** 注册全局组件，需要在components.d.ts中声明组件ts类型 */
import type { App } from 'vue'

// 引入图标组件库
import svgIcons from './svg-icon/index'

// 引入layout组件
import LayoutBasicPage from './layout/basic-page'


const components = [
  ...svgIcons,
  LayoutBasicPage
]

const install = (app: App) => {
  for (const component of components) {
    // 注意全局组件必须要有name属性
    app.component(component.name, component)
  }
}

export default install
